﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class AlarmDuration : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        UpdateGridView();
       
    }
    protected void UpdateGridView()
    {
        TowerDAOs towerDAOs = TowerDAOs.getInstance();
        DataTable dataTable = towerDAOs.getAlarmDuration(Session["aLineName"].ToString(), Session["aTowerName"].ToString(), Session["aType"].ToString(), (DateTime)Session["aTimeBegin"], (DateTime)Session["aTimeEnd"]);
        RadGrid1.DataSource = dataTable;
        RadGrid1.DataBind();
    }

    protected void RadGrid1_PageIndexChanged(object source, Telerik.Web.UI.GridPageChangedEventArgs e)
    {
        RadGrid1.CurrentPageIndex = e.NewPageIndex;
        UpdateGridView();
    }
    protected void RadGrid1_PageSizeChanged(object source, Telerik.Web.UI.GridPageSizeChangedEventArgs e)
    {
        UpdateGridView();
    }
}